//
//  SCSHuanXinManager.h
//  YCSuperSDK_Plugin_VipCustomer
//
//  Created by MacPro on 2021/4/30.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^SCSReceiveMessageHandler)(NSDictionary *body);

@interface SCSHuanXinManager : NSObject

// 接收到im消息回调
@property(nonatomic, copy)SCSReceiveMessageHandler receiveMessageHandler;

+ (instancetype)sharedInstance;

// 获取未读消息数
- (NSNumber *)getUnreadMsgNum;

// 标记消息已读
- (void)markAllMsgAsRead;

// 拉取历史消息
- (void)pullMessage:(NSString *)messageId
              count:(int)loadCount
           response:(void(^)(NSDictionary *obj))response;

// 发送消息
- (void)sendMessageWithType:(NSString *)type
                        msg:(NSString *)msg
                visitorInfo:(NSDictionary *)visitorInfo
                     result:(void(^)(NSDictionary *obj))result;

// 发送评价结果给环信
- (void)sendEvalMsg:(NSDictionary *)data
             result:(void(^)(NSDictionary *obj))result;

@end

NS_ASSUME_NONNULL_END
